#ifndef _H_ACTION
#define _H_ACTION

#include <time.h>
#include "types.h"
#include "actor.h"

#define AC_TY_NONE  0
#define AC_TY_IDLE  1
#define AC_TY_MOVE  2

class action{
    protected:
        clock_t starttime;
        clock_t endtime;

        action_t type;

        actor* myAct;

    public:
        action(actor*);
        virtual ~action();

        action_t getType();
        void setType(action_t);

        clock_t getSTime();
        clock_t getETime();
        void setSTime(clock_t=0);
        void setETime(clock_t);
        void setDuration(clock_t);

        float getProgress();

};

class action_idle: public action{
    protected:

    public:
        action_idle(actor*);
        ~action_idle();

};

class action_move: public action{
    protected:
        coord_t origin;
        coord_t dest;

    public:
        action_move(actor*,coord_t,float,unsigned int);
        ~action_move();

        coord_t getCurPos();
        coord_t getOrig();
        coord_t getDest();
};

#endif
